\newproblem{lay:2_5_9}{
  % Problem identification
	\begin{large}
	  \hspace{\fill}\newline
    \textbf{Lay, 2.5.9}
	\end{large}
	\\
  \ifthenelse{\boolean{identifyAuthor}}{\textit{Carlos Oscar Sorzano, Aug. 31st, 2013} \\}{}

  % Problem statement
  Find an LU factorization of the matrix $A=\begin{pmatrix}3 & 1 & 2 \\ -9 & 0 & -4 \\ 9 & 9 14\end{pmatrix}$
}{
  % Solution
	We apply row operations on $A$ to reduce it to an upper triangular matrix and annotate the different matrices that we needed\\
	\begin{center}
		\begin{tabular}{rcc}
			$A=\begin{pmatrix}3 & 1 & 2 \\ -9 & 0 & -4 \\ 9 & 9 &14\end{pmatrix}$ &
			$\mathbf{r}_2 \leftarrow \mathbf{r}_2 + 3\mathbf{r}_1$ &
			$E_1=\begin{pmatrix}1 & 0 & 0 \\ 3 & 1 & 0 \\ 0 & 0& 1\end{pmatrix}$ \\

			$E_1A=\begin{pmatrix}3 & 1 & 2 \\ 0 & 3 & 2 \\ 9 & 9 &14\end{pmatrix}$ &
			$\mathbf{r}_3 \leftarrow \mathbf{r}_3 - 3\mathbf{r}_1$ &
			$E_2=\begin{pmatrix}1 & 0 & 0 \\ 0 & 1 & 0 \\ -3 & 0& 1\end{pmatrix}$ \\

			$E_2E_1A=\begin{pmatrix}3 & 1 & 2 \\ 0 & 3 & 2 \\ 0 & 6 &8\end{pmatrix}$ &
			$\mathbf{r}_3 \leftarrow \mathbf{r}_3 - 2\mathbf{r}_1$ &
			$E_3=\begin{pmatrix}1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & -2& 1\end{pmatrix}$ \\

			$E_3E_2E_1A=\begin{pmatrix}3 & 1 & 2 \\ 0 & 3 & 2 \\ 0 & 0 & 4\end{pmatrix}$ &
			 &
			 \\
		\end{tabular}
	\end{center}
	This latter matrix is $U$ and $L$ is
	\begin{center}
		$\begin{array}{rcl}L&=&(E_3E_2E_1)^{-1}=E_1^{-1}E_2^{-1}E_3^{-1}\\
		     &=&\begin{pmatrix}1 & 0 & 0 \\ -3 & 1 & 0 \\ 0 & 0& 1\end{pmatrix}
		        \begin{pmatrix}1 & 0 & 0 \\ 0 & 1 & 0 \\ 3 & 0& 1\end{pmatrix}\begin{pmatrix}1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 2& 1\end{pmatrix}
				 =\begin{pmatrix}1 & 0 & 0 \\ -3 & 1 & 0 \\ 3 & 2& 1\end{pmatrix}
		\end{array}$
	\end{center}
	Finally, we have
	\begin{center}
		$A=LU\Rightarrow \begin{pmatrix}3 & 1 & 2 \\ -9 & 0 & -4 \\ 9 & 9 &14\end{pmatrix}=\begin{pmatrix}1 & 0 & 0 \\ -3 & 1 & 0 \\ 3 & 2& 1\end{pmatrix}
		    \begin{pmatrix}3 & 1 & 2 \\ 0 & 3 & 2 \\ 0 & 0 & 4\end{pmatrix}$
	\end{center}
}
\useproblem{lay:2_5_9}
\ifthenelse{\boolean{eachProblemInOnePage}}{\newpage}{}
